//index.js

import {payment} from '../../utils/networkRequest.js'

//获取应用实例
const app = getApp()

Page({
  data: {
    payNumber: {
      stepper: 1,
      min: 1,
      max: 20
    }, 
    name:"111"
  },

  handleZanStepperChange(e) {
    const componentId = e.target.dataset.componentId;
    const stepper = e.detail; 
    this.setData({
      [`${componentId}.stepper`]: stepper, 
    }); 
  },
  //事件处理函数
  bindViewTap: function () {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
     
  },
  onPayMent:function(){
    debugger;
    payment((r)=>{
      wx.requestPayment({
        'timeStamp': r.data.timeStamp,
        'nonceStr': r.data.nonceStr,
        'package': r.data.package,
        'signType': r.data.signType,
        'paySign': r.data.paySign,
        'success': function (res) {
        },
        'fail': function (res) {
        }
      })
  debugger;
    })
  }
   
})
